﻿using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace HEFramework
{
    public class HUDSlider : Entity, IAwake, IUpdate, IDestroy
    {
        public class HUDSliderElement
        {
            public GameObject Object { get; set; }

            public Image HP_Fill { get; set; }
            public Image MP_Fill { get; set; }

            public Vector2 Pos { get; set; }

            public bool IsActive
            {
                get { return Object.gameObject.activeSelf; }
                set { Object.gameObject.SetActive(value); }
            }

            /// <summary>
            /// 是否空闲
            /// </summary>
            public bool IsFree { get; set; }
        }

        public List<HUDSliderElement> Elements { get; } = new();
    }
}